const newdata = {
    form:{
        sex:0,
        id:'',
        username:'',
        telephone:'',
    },
    status:0,
}
export default function welcome(state = newdata,action){
    switch(action.type){
        case 'add_datas':
            return Object.assign({},state,{loading:false,form:action.form});
        case 'set_status':
            return Object.assign({},state,{loading:false,status:0});
        case 'edit_datas':
              return Object.assign({},state,{loading:false,form:action.form,status:1});
        case 'edit_status':
             return Object.assign({},state,{loading:false,form:action.form,id:action.id});
        default:
            return state;
    }
}
